const mongoose = require('mongoose')

const schame = new mongoose.Schema({
    name: String,
    avatar: String,
    title: String,
    categories: [{ type: mongoose.Schema.Types.ObjectId, ref: 'Category' }],
    scores: {
        difficult: { type: Number },
        skills: { type: Number },
        attack: { type: Number },
        survive: { type: Number },
    },
    skills: [{
        icon: String,
        name: String,
        description: String,
        tips: String,
    }],
    items1: [{ type: mongoose.Schema.Types.ObjectId, ref: 'Item' }],
    items2: [{ type: mongoose.Schema.Types.ObjectId, ref: 'Item' }],
    usageTips: String,
    battleTips: String,
    teamTips: String,
    partners: [{
        hero: { type: mongoose.Schema.Types.ObjectId, ref: 'hero' },
        description: String,
    }]
})

module.exports = mongoose.model('Hero', schame)